{% extends "administrative/base.html" %}

{% block page_link %}
    <script src="../../static/administrative/js/document_number.js"></script>
    <link rel="stylesheet" href="../../static/administrative/css/style.css">
{% endblock %}


{% block style %}
    <style>
        .add_class{
            background: #1E90FF;
        }
        tr{
            height: 35px;
        }
        th{
            text-align: center;
        }
        table {
            table-layout: fixed;
        }
        td:first-child, th:first-child {
            position:sticky;
            left:0; /* 首行永远固定在左侧 */
            z-index:1;
        }
        thead tr th {
            position:sticky;
            top:0; /* 列首永远固定在头部  */
            background-color: #E8E8E8;
        }
        th:first-child{
            z-index:2;
        }
        .preserve{
            height: 30px;width: 90%;background: #0070c1;color: #ffffff;border-radius: 3px
        }
        .input-style{
            display: inline-block;
            width: 50%;
            height: 35px;
            border-radius: 7px;
            font-size: 14px;
            padding-left: 1%;
            border: #cfcfcf solid 1px;
        }
    </style>
{% endblock %}



{% block right_content %}
    <div class="headline">
        <div style="width: 15%;height: 100%;line-height: 40px;float: left;padding-left: 1%;">
            <a href="document_number.html" style="color: #0b0b0b;">
                <i class="iconfont icon-bianhaopeizhi"></i>
                <span> 公文编号</span>
            </a>
        </div>

        <div style="width: 7%;text-align: center;height: 100%;line-height: 40px;float: right;">
            <button data-toggle="modal" data-target=".bd-example-modal-xl" id="add_station" type="button" class="btn btn-default add-station preserve">新建</button>
        </div>
    </div>

    <div class="right-box" style="width: 100%;height: 93%;">
        <div style="height: 88%;width: 100%;overflow: auto;">
            <table class="table table-hover table-bordered" style="border-collapse: collapse;width: 100%;">
                <thead>
                    <tr>
                        <th scope="col" style="width: 1%;">序号</th>
                        <th scope="col" style="width: 8%;">收发类型</th>
                        <th scope="col" style="width: 5%;">编号类别</th>
                        <th scope="col" style="width: 5%;">编号定义</th>
                        <th scope="col" style="width: 5%;">操作</th>
                    </tr>
                </thead>
                <tbody style="overflow: auto;" id="t_table"></tbody>
            </table>
            <div id="img-display" style="width: 75%;text-align: center;position: fixed;display: none;">
                <div style="margin-top: 10%;">
                    <img src="../../static/public_file/images/page-img/11.jpg" alt="">
                    <p style="margin: 0;padding: 0;vertical-align: top;">暂无数据</p>
                </div>
            </div>
        </div>
        <div style="width: 100%;border: #cfcfcf solid 0.5px;"></div>
        <div id="pagination" class="pagination" style="margin-left: 20px;margin-top: 1.5%;"></div>
    </div>


    <div class="modal fade bd-example-modal-xl" tabindex="-1" role="dialog"   aria-hidden="true">
        <div class="modal-dialog modal-xl" style="margin-top: 12%;">
            <div class="modal-content"  style="height: 300px;border-radius: 7px;width: 900px;margin-left: 15%;background: #F8F8FF;">
                <div class="modal-header" style="height: 50px;">
                    <h5 class="modal-title" style="line-height: 50px;width: 10%;">新增公文编号</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"  style="margin-right: 3%;line-height: 50px;">
                        <span aria-hidden="true" style="font-size: 28px;">&times;</span>
                    </button>
                </div>
                <div class="modal-body" style="height: 200px;padding: 2%;">
                    <div style="color: #0b0b0b;">
                        <label for="" style="width: 20%;text-align: right;">发文类型：</label>
                        <input type="radio" name="myname" value="发文字号"> 发文字号
                        <input type="radio" style="margin-left: 3%;" name="myname" value="收文编号"> 收文编号
                    </div>

                    <div style="color: #0b0b0b;margin-top: 2%;">
                        <label for="" style="width: 20%;text-align: right">编号类别：</label>
                        <input id="number_type" type="text" class="input-style" placeholder="编号类别">
                        <span style="color: red;font-size: 8px;padding-left: 3%;">如：行政类、党委类</span>
                    </div>

                    <div style="color: #0b0b0b;margin-top: 2%;">
                        <label for="" style="width: 20%;text-align: right">编号定义：</label>
                        <input id="serial_definition" type="text" class="input-style" placeholder="编号定义">
                        <span style="color: red;font-size: 8px;padding-left: 3%;">年份格式：yyyy，序号格式：indexOrder</span>
                    </div>
                </div>
                <div class="modal-footer" style="height: 50px;">
                    <button id="model-affirm" type="button" class="btn btn-primary" style="margin-left: 2%;margin-right: 2%;" onclick="summit_val()">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;提&nbsp;交&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</button>
                </div>
            </div>
        </div>
    </div>


    <!--确认删除？-->
    <div class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-sm" style="margin-top: 10%;">
            <div class="modal-content" style="height: 150px;border-radius: 7px;width: 300px;background: #F8F8FF;border: #1E90FF solid 1px;">
                <div class="modal-header" style="height: 40px;background: #1E90FF;border-top-left-radius: 7px;border-top-right-radius: 7px;">
                    <h5 class="modal-title" style="line-height: 40px;width: 40%;text-align: center;color: #ffffff;">
                        提示对话框
                    </h5>
                    <button id="close-model2" type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-right: 3%;line-height: 40px;">
                        <span aria-hidden="true" style="font-size: 28px;color: white;">&times;</span>
                    </button>
                </div>
                <div class="modal-body" style="height: 50px;line-height: 60px;text-align: center;">
                    <p id="Confirm-content">是否删除此公文编号？</p>
                </div>
                <div class="modal-footer" style="height: 40px;">
                    <button id="countersign" type="button" class="btn btn-primary" aria-label="Close"
                            style="margin-left: 2%;margin-right: 2%;background: #1E90FF;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;确&nbsp;认&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </button>
                </div>
            </div>
        </div>
    </div>
{% endblock %}

{% block script %}
    <script>
        function click_ul_9() {
            if (document.getElementById("jiantou5").className === "iconfont icon-jiantou-shang"){
                document.getElementById("jiantou5").className = "iconfont icon-jiantou-xia";
                document.getElementById("dispatch-Administrator-1").style.display = "inline-block";
            }else {
                document.getElementById("jiantou5").className = "iconfont icon-jiantou-shang";
                document.getElementById("dispatch-Administrator-1").style.display = "none";
            }
        }

        function click_ul_10() {
            if (document.getElementById("jiantou4").className === "iconfont icon-jiantou-shang"){
                document.getElementById("jiantou4").className = "iconfont icon-jiantou-xia";
                document.getElementById("dispatch-Administrator").style.display = "inline-block";
            }else {
                document.getElementById("jiantou4").className = "iconfont icon-jiantou-shang";
                document.getElementById("dispatch-Administrator").style.display = "none";
            }
        }
    </script>
{% endblock %}
